package com.luo.ai.assistant.chat;

import jakarta.validation.constraints.NotBlank;
import org.springframework.validation.annotation.Validated;
import reactor.core.publisher.Flux;

/**
 * Chat with RAG (Retrieval Augmented Generation) 服务
 *
 * @author luohq
 * @date 2025-01-02 10:34
 */
@Validated
public interface ChatRagService {

    /**
     * Chat
     *
     * @param userInput the user input
     * @return the response
     */
    String chat(@NotBlank String userInput);

    /**
     * Chat stream
     *
     * @param userInput the user input
     * @return the response
     */
    Flux<String> chatStream(@NotBlank String userInput);

    /**
     * Chat with RAG
     *
     * @param userInput the user input
     * @return the response
     */
    String chatRag(@NotBlank String userInput);

    /**
     * Chat Stream with RAG
     *
     * @param userInput the user input
     * @return the response
     */
    Flux<String> chatRagStream(@NotBlank String userInput);

    /**
     * Chat with RAG
     *
     * @param myChatRequest my chat request
     * @return the response
     */
    String chatRag(@Validated MyChatRequest myChatRequest);

    /**
     * Chat Stream with RAG
     *
     * @param myChatRequest my chat request
     * @return the response
     */
    Flux<String> chatRagStream(@Validated MyChatRequest myChatRequest);

}
